<template>
	<view class="home-page">
		<u-navbar :is-back="false" :height="statusBarHeight" :border-bottom="false" :background="background" title=" ">
				<view class="icon_setUp">
					<image src="../../static/image/hometabBg.png" mode="" style="height: 30rpx;"></image>
				</view>
				<image :class="muteBgMusic ? 'music stop' : 'music'"
					:src="muteBgMusic?'https://img.50api.cn/vx.tongbayun.v3/drawing136eef561718eee2a9.png':'https://img.50api.cn/vx.tongbayun.v3/drawing6.png'"
					mode="" @click="playMusic();"></image>
		</u-navbar>
<!-- 		<view class="position-box" :style="{height: statusBarHeight + 'rpx'}">
			<nav-bar backState="2000" fontColor="#FFF" :titleCenter="false" type="transparent">
				<view class="icon_setUp" slot="left">
					<image src="../../static/image/mallslogan.png" mode="" style="height: 30rpx;"></image>
				</view>
			</nav-bar>


		</view> -->
		<view class="banner">
			<view class="banner-box">
				<swiper class="swiper" circular :autoplay="true">
					<swiper-item v-for="(item,idx) in bannerlist" :key="idx">
						<image :src="item.image" mode="" style="width: 100%;height: 100%;border-radius: 30rpx;"></image>
					</swiper-item>
				</swiper>
			</view>
			<view class="wind-list">
				<!-- <ScrollBar ref="windDom" :maxTop="140"/> -->
				<ToastBar ref="windDom" :maxTop="140"/>
			</view>
		</view>


	<!-- 	<view class="tab">
			<u-tabs :list="MangheType" name='title' active-color="#000" :current="current" @change="change">
			</u-tabs>
		</view> -->

		<view class="new-box" v-if="newBoxObj" @click="lookbox(newBoxObj)">
			<view class="new-box-title">
				<img src="https://img.50api.cn/vx.tongbayun.v3/newBox2.png" alt="" class="new-img">
			</view>
			<view class="box-list new-box-content">
				<view class="box-list-left">
					<image :src="newBoxObj.footer_image"></image>
				</view>
				<view class="good-list-info">
					<view class="box-list-right-name-2">
						{{ newBoxObj.title }}
					</view>
					<view class="new-swiper">
						<swiper class="swiper-item" circular :autoplay="true" :display-multiple-items="4" :duration="3000" :interval="1200">
							<swiper-item v-for="(val, i) in noticeList" :key="i" style="margin-right: 20rpx;">
								<image :src="val" mode="" style="width: 65rpx;height: 60rpx;border-radius: 15rpx;"></image>
							</swiper-item>
					</swiper>
					</view>
					<view>
						<!-- <view class="box-list-right-price">
							<view class="left-price">￥ {{newBoxObj.price}}</view>
							<view class="right-price">￥ {{(newBoxObj.price * 1.2).toFixed(2) }}</view>
						</view> -->
						<view class="box-list-right-Zprice">
							<!-- <image src="https://img.50api.cn/vx.tongbayun.v3/newBox3.png" mode=""></image> -->
							<image src="../../static/image/mashangmai.png" mode=""></image>
							<!-- 	<view class="box-list-right-Zprice-left">商品价值</view>
							<view class="box-list-right-Zprice-right">
								{{ (newBoxObj.price * 0.5).toFixed(2) }}-{{(newBoxObj.price * 3.5).toFixed(2) }}元
							</view>
 -->
						</view>
					</view>

				</view>

			</view>
		</view>

		<view class="box-list" v-for="item in prizeList" :key="item.id" @click="lookbox(item)">
			<view class="box-list-left">
				<image :src="item.footer_image"></image>
			</view>
			<view class="good-list-info">
				<view class="box-list-right-name-2" style="margin-top: 15rpx;">
					{{ item.title }}
				</view>
				<view class="scroll-box" ref="scrollEl">
					<swiper class="swiper-item" circular :autoplay="true" :display-multiple-items="4" :duration="3000" :interval="1200">
						<swiper-item v-for="(val, i) in noticeList" :key="i" style="margin-right: 20rpx;">
							<image :src="val" mode="" style="width: 60rpx;height: 60rpx;border-radius: 15rpx;"></image>
						</swiper-item>
					</swiper>
				</view>
				<view>
					<view class="box-list-right-price">
						<view class="left-price">￥ {{item.price}}</view>
						<view class="right-price">￥ {{(item.price * 1.2).toFixed(2) }}</view>
						<!-- <view class="right-price" v-show="current !== 0">￥ {{(item.goods_price * 1.2).toFixed(2) }}</view> -->
					</view>
					<!-- <view class="box-list-right-Zprice">
						<view class="box-list-right-Zprice-left">商品价值</view>
						<view class="box-list-right-Zprice-right">
							{{ Number(item.min_goods_price).toFixed(2) }}-{{ Number(item.max_goods_price).toFixed(2) }}元
						</view>
					</view> -->
				</view>

			</view>
		</view>

		<!-- #ifdef MP-WEIXIN -->
		<!-- <view class="xf-tip" v-if="isLogin==false">
			<u-checkbox shape="circle" v-model="agreeChecked" active-color="#9400D3">
			</u-checkbox>
			<view class="agreeText">我已阅读 <text class="book-style" @click="openAgree">《用户协议》</text>，<text
					@click="openAgree" class="book-style">《隐私协议》</text>并同意授权获得本机号码</view>
			<button open-type="getPhoneNumber" @getphonenumber="login" class="xf-tip-btn">
				同意并授权
			</button>
			<AgreePop :show="showAgree" @close="showAgree = false" />
		</view> -->
		<!-- #endif -->
		<!-- todo：首页弹窗 -->
		<u-popup v-model="tanShow" mode="center">
			<view class="tanBox">
				<view class="pic">
					<image @click="advert_on(tanCon)" :src="tanCon.image" mode="widthFix"></image>
				</view>
				<view class="off">
					<image @click="tancancel();" src="http://mhimg.69box.cn/kaixiang/down.png" mode="">
					</image>
				</view>
			</view>
		</u-popup>
		<!-- 发货规则 -->
		<u-modal v-model="deliverShow" title="发货规则" confirm-text="我知道了" confirm-color="rgba(86, 114, 250, 0.74)">
		  <!-- <div class="delive-rule"> -->
			<scroll-view>
			1．用户提货后，平台将在3个工作日内，按照您自行填写的收获地址发货，发货后会及时上传快递单号供您查验。 如遇"已提货却无物流信息"，可能上传更新不及时，可及时咨询客服，客服会查验物流信息，并及时上传更新：2．平台内每次提货，无论货品数量，同一收件地址只需支付8元运费。平台可配送区域为中国大陆地区（除特殊偏 远地区）。盲盒商品默认发韵达或圆通，部分贵重物品会选择顺丰或京东快递。部分偏远地区可能运输时间较长，请 理解。 3.收到商品后，如遇包装破损的情况，您可以选择拒收，并及时联系客服换货；如发现商品存在质量问题（非人 为损坏），请在7天内联系客服退换货；未成年人禁止消费：未成年的消费行为需由监护人陪同并监管：平台会根据相关法律法规决定是否对您的账号予以服务限制。如遇未成年消费行为，。其监护人可联系客服，通过提供必要证明材料，申请未成年人消费退款。
		  <!-- </div> -->
		</scroll-view>
		</u-modal>
		<u-tabbar v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
	</view>
</template>

<script>
	import AgreePop from '@/components/AgreePop.vue'
	import NavBar from '@/uni_modules/zhouWei-navBar/components/zhouWei-navBar/zhouWei-navBar.vue';
	// import ScrollBar from '@/components/ScrollBar.vue'
	import ToastBar from '@/components/ToastBar.vue'
	// #ifdef APP-PLUS
	import update from '@/pages/checkUpdate/utils/check-update.js'
	// #endif
	import {
		tabbar
	} from "@/common/tabbar.js"
	// 自定义导航栏组件
	export default {
		components: {
			NavBar,
			AgreePop,
			// ScrollBar,
			ToastBar
		},
		data() {
			return {
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
				current: 0,
				tabbar: tabbar,
				showAgree: false,
				agreeChecked: false,
				statusBarHeight: 0,
				MangheType: [],
				current: 0,
				prizeList: [],
				swiperCurrentId: 0,
				newPropelBox: null,
				muteBgMusic: false, //是否静音
				mhImg: null,
				allmhBox: [],
				pnoneNum: '',
				bannerlist: [],
				share_ma: '',
				isLogin: false,
				tongList: [], //中奖通知
				tong: '',
				dings: '',
				newBoxObj: null,
				aaa:0,
				windTime : null,
				background: {
				
					background: "url(" + require('@/static/image/mallBG.png') + ") no-repeat",
					backgroundSize: '100% 100%',
				
				},
				tanShow: false,
				tanList: [], //弹窗列表
				tanCon: '',
				deliverShow: false, // 发货规则弹窗
				noticeList: [
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230417/8cd3c9435263feae30aef46f4f1a4d36.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230413/90207c1b60dc4d0311217728348bacd4.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230412/763c509370eeb38d9cf8b8342cfcff7d.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230412/5d9f8c5c5ab276a7cff27fbe7c4f890c.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230417/8cd3c9435263feae30aef46f4f1a4d36.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230412/e9b5aad3cb17b3eadc9966c8f7e3acd9.png",

					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230604/9bda8d51920e2e4934094167266c0032.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230604/e703fc1d2ea05a5f72986227e05f06d0.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230604/459861b96cf25006a4f92347a78547bf.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230604/689f3b07078ef3e7aa20707b6a595b6e.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230604/974fb31932e446a0e504ea157e0c4427.png",
					// "http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230604/d0842c431193253301c085bd2dec7fe0.png"

					"http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230924/f41b6e409cf7183d15b76dec8a7e86fa.png",
					"http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230411/f1513038617ee7d15da34d7166f6bfb5.jpg",
					"http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230411/c9eb396aaac9384ccd77b2b42e7039be.jpg",
					"http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230411/76e02b36d54a59383813e33e9ac6dbbd.jpg",
					"http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230411/93b8794b366a7f16d64212076a154a53.jpg",
					"http://maxbox-img.oss-cn-beijing.aliyuncs.com/uploads/20230411/2e5157fe0146d0b2e7b5a4959fa5973e.jpg"
				]
			}
		},
		onLoad(option) {
			// #ifdef APP-PLUS
			update()
			// #endif
			// console.log(option,'-------------========',option.pid);
			let codeMa = uni.getStorageSync('share_ma')
			if(option.pid){
				uni.setStorageSync('pid', option.pid)
				this.share_ma = option.pid
			}else if(option.share_ma){
				// console.log(option.share_ma ,'option.share_ma')
				this.share_ma = option.share_ma
			}else if(codeMa){
				this.share_ma = codeMa
			}
			console.log(this.share_ma, "邀请码");
			uni.$on('music', (data) => {
				this.muteBgMusic = data
			})
			this.deliverShow = true
			this.getPop()
			this.getManghe()
			this.getBanner()
		},
		onShow() {
			//获取手机状态栏高度
			this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'] !== 0 ? uni.getSystemInfoSync()[
				'statusBarHeight'] + 20 : 40
			if (uni.getStorageSync("user").id) {
				console.log(this.statusBarHeight,'-----');
				this.isLogin = true;
			}
			this.windTime = setInterval(() => {
					this.colrdo()
				}, 2000)
			this.getTong()
		},
		onHide() {
			clearInterval(this.windTime)
		},
		watch: {
			current(newVal, oldVal) {
				console.log(newVal, oldVal)
			},
			muteBgMusic(newValue, oldValue) {
				if (newValue) {
					// 开启静音
					this.$music.playBgm({
						mute: true
					});
				} else {
					// 关闭 静音
					this.$music.playBgm({
						mute: false
					});
				}
			}
		},
		methods: {
			//获取弹窗
			getPop() {
				this.$http({
					url: "api/common/get_advert",
					data: {
						type: 6
					}
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						let arr = []
						arr = res.data.data
						if (arr.length != 0) {
							this.tanShow = true
							this.tanList = arr
							this.tanCon = arr[0]
						}
					}
				}).catch(err => {});
			},
			tancancel() {
				this.tanShow = false
				this.tanidx += 1
				if (this.tanidx < this.tanList.length) {
					this.tanShow = true
				} else {
					return
				}
				this.tanCon = this.tanList[this.tanidx]
			},
			//广告点击跳转
			advert_on(info) {
				if (info.link_url_type == 1) { //指定盲盒跳转
					uni.navigateTo({
						url: '/pages/home/kaixiang?id=' + info.link_url + '&music=' + this.muteBgMusic
					})
				} else if (info.link_url_type == 2) { //跳转外部网站
					uni.navigateTo({
						url: '/pages/tabBar/h5'
					})
					setTimeout(() => {
						uni.$emit('go_h5', {
							url: info.link_url
						})
					}, 600)
				}
			},
			colrdo() {
				this.aaa += 1;
				if(this.aaa >= this.tongList.length ){
					this.aaa = 0 ;
				}
				this.$refs.windDom.add({
					item: this.tongList[this.aaa]
				});
			},
			scroll(e) {
				this.old.scrollTop = e.detail.scrollTop
			},
			openAgree() {
				this.showAgree = true
			},
			getBanner() {
				this.$http({
					url: "api/common/get_advert",
					data: {
						type: 5
					}
				}).then(res => {
					if (res.data.code == 1) {
						this.bannerlist = res.data.data
					}
				}).catch(err => {});
			},
			change(index) {
				this.current = index
				if (index === 0) {
					this.prizeList = this.allmhBox
				} else {
					this.swiperCurrentId = this.MangheType[index].id
					this.loadPrizeList()
				}
			},
			getManghe() {
				uni.hideLoading()
				this.$http({
					url: "api/common/get_blind_box",
				}).then(res => {
					if (res.data.code == 1) {
						let getBox = res.data.data
						this.newBoxObj = getBox.find(item => item.is_new_user_discount === 1)
						if(this.newBoxObj){
							this.allmhBox = getBox.splice(getBox.indexOf(this.newBoxObj), 1)
						}
						this.allmhBox = getBox
						this.MangheType = [{
							"title": "全部"
						}, ...res.data.data]
						this.prizeList = this.allmhBox
						console.log(this.prizeList,'this.prizeList');
					}
				}).catch(err => {});
			},
			//加载奖品列表
			loadPrizeList() {
				uni.showLoading()
				if (this.current === 0) {
					this.prizeList = this.allmhBox
					uni.hideLoading()
				} else {
					this.$http({
						url: "api/common/get_blind_box_goods",
						data: {
							blind_box_id: this.swiperCurrentId
						}
					}).then(res => {
						uni.hideLoading()
						if (res.data.code == 1) {
							this.mhImg = res.data.data.blind_box_info.footer_image
							this.prizeList = res.data.data.goods_list
							let sortData = res.data.data.goods_list.sort((a, b) => a.goods_pirce - b.goods_pirce)
							this.newPropelBox = sortData[0]
						}
					}).catch(err => {});
				}
			},
			// 查看盲盒
			lookbox(params) {
				let id = params.id
				uni.navigateTo({
					url: '/pages/home/kaixiang?id=' + id + '&music=' + this.muteBgMusic
				})
			},
			// 前往旧的盒子
			gotoOldHome() {
				uni.switchTab({
					url: '/pages/home/old_home'
				});
			},
			getTong() {
				this.$http({
					url: "api/common/get_blind_box_open_log",
				}).then(res => {
					if (res.data.code == 1) {
						this.tongList = []
						this.tongList = res.data.data
					}
				}).catch(err => {});
			},
			// tongz() {
			// 	if (this.tongList.length == 0) {
			// 		return
			// 	}
			// 	var arr = this.$u.randomArray(this.tongList)
			// 	arr.forEach(item => {
			// 		item.text = '恭喜 ' + item.username + ' 获得' + item.goods_name
			// 		item.text = [item.text]
			// 		item.bg = 'https://img.50api.cn/dingdang/sstz.png'
			// 		// if (item.tag == 'legend') {
			// 		// 	item.bg = 'https://img.50api.cn/dingdang/cstz.png'
			// 		// } else {
			// 		// 	item.bg = 'https://img.50api.cn/dingdang/sstz.png'
			// 		// }
			// 	})
			// 	this.tong = arr[0]
			// 	this.dings = setTimeout(() => {
			// 		this.tong = ""
			// 	}, 9000)
			// },
			playMusic() {
				this.muteBgMusic = !this.muteBgMusic;
			},
			login(e) {
				console.log(e,'---------------------eeee');
				if (e.detail.encryptedData) {
					if (this.agreeChecked) {
						let {
							code,
							encryptedData,
							iv
						} = e.detail
						this.$http({
							url: "api/login/get_mp_wechat_phone",
							data: {
								"code": code,
							}
						}).then(result => {
							console.log(result,'result');
							if (result.data.code == 1) {
								this.pnoneNum = result.data.data.phoneNumber
								this.weixin()
							}else{
								uni.showToast({
									icon:'none',
									title:'状态码错误'
								})
							}
						}).catch(err => {});
					} else {
						this.$tip.tip("请先同意用户协议和隐私协议")
					}
				} else {
					this.$tip.tip("授权失败")
				}
			},
			weixin() {
				uni.login({
					success: (request) => {
				// console.log(this.share_ma,'this.share_ma');
						if (request.code) {
							this.$http({
								url: "api/login/mp_wechat_login",
								data: {
									"code": request.code,
									"nickName": this.pnoneNum,
									"share_ma": this.share_ma,
								}
							}).then(result => {
								if (result.data.code == 1) {
									uni.setStorageSync('user_token', result.data.data.token)
									uni.setStorageSync('user', result.data.data.member_data)
									uni.$emit('updataUser');
									this.$tip.tip(result.data.msg)
									this.isLogin = true;
								} else {
									this.$tip.tip(result.data.msg)
								}
							}).catch(err => {});
						}
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.home-page {
		background: url('https://img.50api.cn/vx.tongbayun.v3/11.jpg') no-repeat;
		background-size: 100vw 100%;
		overflow: hidden;
		position: relative;
		background-attachment: fixed;
		background-position: center top;
		min-height: 100vh;
		/* #ifdef H5 */
		min-height: calc(100vh - 50px);
		/* #endif */
	}
</style>

<style lang="scss" scoped>
	.tanBox{
		width: 600rpx;
		text-align: center;
		.pic{
			image{
				width: 100%;
			}
		}
		.off{
			image{
				width: 70rpx;
				height: 70rpx;
				display: inline-block;
			}
		}
	}
	.position-box {
		position: relative;
		// height: calc(300rpx + 170rpx);
	}

	.icon_setUp {
		padding-left: 20rpx;
		padding-right: 150rpx;
		image{
			display: inline-block;
			width: 472rpx;
			height: 30rpx;
		}
	}
	.music{
		width: 110rpx;
		height: 110rpx;
		position: fixed;
		top: 320rpx;
		left: 0;
		z-index: 99;
		animation: music 4s linear 0s infinite normal none;
	}
	@keyframes music {
		0% {
			transform: rotate(0deg);
		}
	
		100% {
			transform: rotate(360deg);
		}
	
	}
	.stop {
		animation-play-state: paused;
	}
	.n-bg {
		position: absolute;
		top: 0;
	}

	.banner {
		width: 750rpx;
		height: 340rpx;
		box-sizing: border-box;
		overflow: hidden;
		margin: 0 auto;
		z-index: 0;

		position: relative;

		&-box {
			position: absolute;
			height: 340rpx;
			width: 690rpx;
			left: 30rpx;
			border-radius: 30rpx;
			overflow: hidden;
			.swiper {
				border-radius: 30rpx;
				overflow: hidden;
				height: 340rpx;
			}

		}

		image {
		
			overflow: hidden;
		}

		.wind-list {
			position: absolute;
			top: 20rpx;
			width: 750rpx;
			// width: fit-content;
			height: 400rpx;
		}
	}

	.nav {
		width: 690rpx;
		height: 170rpx;
		position: absolute;
		left: 30rpx;
		display: flex;
		justify-content: space-between;

		&-left,
		&-right {
			width: 330rpx;
			height: 170rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}

	.tab {
		height: 78rpx;
		background-color: #fff;
		margin-bottom: 30rpx;
	}


	.box-list {
		width: 690rpx;
		height: 300rpx;
		margin: 30rpx auto;
		border-radius: 10rpx;
		overflow: hidden;
		box-sizing: border-box;
		display: flex;
		background-color: #fff;
		justify-content: space-between;
		align-items: center;
		padding: 25rpx 40rpx 25rpx 60rpx;
		background: url('../../static/image/herchBg.png') no-repeat;
		background-size: 690rpx 300rpx;

		// overflow: hidden;
		// background-attachment: fixed;
		// background-position: center top;
		&-left {
			width: 200rpx;
			height: 200rpx;
			flex-shrink: 0;
			display: flex;
			justify-content: center;
			align-items: center;

			image {
				width: 160rpx;
				height: 160rpx;
			}
		}

		&-right {
			display: flex;
			flex-direction: column;
			justify-content: space-between;

			&-name {
				font-size: 36rpx;
				color: #000;
				font-weight: bold;
				overflow: hidden;
				line-height: 40rpx;
				height: 120rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-box-pack: center;
				-webkit-box-align: center;
				-webkit-line-clamp: 3;
			}

			&-img {
				display: flex;
				justify-content: space-between;
				// margin-top: 16rpx;
			}
		}
	}

	.box-list-right-price {
		display: flex;
		margin-top: 10rpx;
		display: flex;
		align-items: flex-end;

		.left-price {
			font-size: 36rpx;
			color: #E20014;
			font-weight: bold;
			white-space: nowrap;
		}

		.right-price {
			font-size: 28rpx;
			color: #909399;
			text-decoration: line-through;
			margin-left: 6rpx;
			white-space: nowrap;
		}
	}

	.box-list-right-Zprice {
		margin-top: 10rpx;
		display: flex;
		height: 40rpx;
		box-sizing: border-box;

		&-left {
			height: 40rpx;
			width: 140rpx;
			color: #cb5967;
			font-size: 20rpx;
			text-align: center;
			line-height: 40rpx;
			background: url('https://img.50api.cn/vx.tongbayun.v3/price-bg1.png') no-repeat;
			background-size: 140rpx 40rpx;

			// background: -webkit-linear-gradient(left,#ECE5FD,#F1F7FE,#CDD1FB);
			// background: -webkit-linear-gradient(left,#ef9e59,#cf6463);
			// background: linear-gradient(to #ef9e59 , #cf6463);
		}

		&-right {
			height: 40rpx;
			width: 280rpx;
			font-size: 20rpx;
			color: #cb5967;
			background: url('https://img.50api.cn/vx.tongbayun.v3/price-bg2.png') no-repeat;
			background-size: 200rpx 40rpx;
			line-height: 40rpx;
			padding-left: 10rpx;
		}
	}

	.box-list-right-name-2 {
		width: 382rpx;
		font-size: 32rpx;
		color: #000;
		font-weight: bold;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		line-height: 36rpx;
	}

	.good-list-info {
		// height: 160rpx;
		height: 195rpx;
		width: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.label-name {
		font-size: 30rpx;
		height: 60rpx;
		color: #909399;
	}

	/deep/ .xf-tip {
		background-color: rgba(0, 0, 0, 0.9);
		width: 750rpx;
		position: fixed;
		bottom: 200rpx;
		padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
		padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
		left: 0rpx;
		color: #fbeee6;
		display: flex;
		padding: 30rpx 20rpx;
		box-sizing: border-box;
		align-items: center;
		z-index: 999999999;

		&-bth {
			flex-shrink: 0;
			padding: 20rpx !important;
		}
	}

	/deep/ .xf-tip-btn {
		padding: 0rpx 10rpx !important;
		flex-shrink: 0;
		height: 60rpx;
		line-height: 60rpx;
		margin-left: 20rpx;
		font-size: 20rpx;
		border-radius: 30rpx;
		background-color: #9400D3;
		color: #fff;
	}

	.agreeText {
		word-wrap: break-word;
		font-size: 20rpx;
	}

	.book-style {
		color: #409eff;
	}

	.new-box {
		width: 690rpx;
		height: 340rpx;
		margin: 30rpx auto;
		border-radius: 10rpx;
		overflow: hidden;
		box-sizing: border-box;

		&-title {
			height: 80rpx;
			// background: url('https://img.50api.cn/vx.tongbayun.v3/newBox1.png') no-repeat;
			background: url('../../static/image/newBox2.png') no-repeat;
			background-size: 100% 100%;
			position: relative;

			.new-img {
				width: 130rpx;
				position: absolute;
				height: 130rpx;
				right: 0;
				bottom: -50rpx;
			}

		}

		&-content {
			height: 260rpx;
			box-sizing: border-box;
			border: 2px solid #cb5967;
			margin: 0;
			background: none;
			// background-color: linear-gradient( #F6E3E2 ,#FAF7F7 );
			// background-color: linear-gradient(to #ef9e59 , #cf6463);
		}

		.box-list-right-Zprice {
			width: 300rpx;
			height: 80rpx;
			animation: newBtn 2s linear infinite;

			image {
				width: 100%;
				height: 100%;
			}
		}
	}


	@keyframes newBtn {
		0% {
			transform: scale(1);
		}

		50% {
			transform: scale(1.1);
		}

		100% {
			transform: scale(1);
		}
	}

	.tong {
		position: fixed;
		left: 0;
		top: 220rpx;
		width: 750rpx;
		background-size: 100% 100% !important;
		height: 80rpx;
		background-repeat: no-repeat !important;
		/* #ifdef H5 */
		top: 150rpx;
		/* #endif */
	}

	.tong .text {
		/* width: 550rpx; */
		padding: 0 30rpx;
		padding-right: 120rpx;
		box-sizing: border-box;
		position: relative;
	}

	.tong image {
		position: absolute;
		width: 80rpx;
		right: 50rpx;
		top: 0rpx;
	}

	@keyframes barrage {
		0% {
			left: 100%;
			transform: translate3d(0, 0, 0);

		}

		50% {
			left: 0;
			transform: translate3d(-100%, 0, 0);
		}

	}

	.block {
		position: absolute;
		width: 200rpx;
		animation: barrage 5s linear 0s;
	}
	/deep/ .u-model__content{
		padding: 30rpx;
	}
	.delive-rule{
		color: #42454A;
		line-height: 50rpx;
	}
	.scroll-box{
		width: 85%;
		height: 60rpx;
		// background: orange;
		display: flex;
		align-items: center;
		.swiper-item{
			width: 100%;
			height: 60rpx;
		}
	}
	.new-swiper{
		width: 100%;
		height: 60rpx;
	}
</style>
